<template>
	<el-main>
		<el-card shadow="never" header="批量发货">
			

			<el-row>
            <el-col :lg="{span:12, offset: 2}">
                    <el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="left">
                        
                        <el-form-item label="下载模板">
							<a href="" style="color:#FF33CC">点我下载</a>
                        </el-form-item>
                        <el-form-item label="上传模板" prop="create_time">
									<sc-upload-file v-model="fileurl" :limit="1" tip="请先下载模板填写后再上传">
										<el-button type="default" icon="el-icon-upload">上传附件</el-button>
									</sc-upload-file>
		
                        </el-form-item>
                        

                        <el-button type="primary" :loading="isSaveing" @click="submit()">开始批量发货</el-button>
                    </el-form>
 
					</el-col>
				</el-row>


		</el-card>
	</el-main>
</template>

<script>
	export default {
		name: 'upload',
		data() {
			return {
				uploadApi: this.$API.common.upload,
				fileurlArr: [
					{
						name: '销售合同模板.xlsx',
						url: 'http://www.scuiadmin.com/files/220000198611262243.xlsx'
					}
				],
				form: {
					file1: "",
					file2: "",
					file3: "",
					file4: "",
					date: ""
				},
				rules: {
					file1: [
						{required: true, message: '请上传', trigger: 'change'}
					]
				}
			}
		},
		methods: {
			success(response){
				this.$alert(`success函数钩子，可用于类似OCR返回信息，return false后阻止后续执行，回调参数打开控制台查看`, {
					title: "提示",
					type: "success"
				})
				console.log(response);
				return false;
			},
			submitForm(){
				this.$refs.ruleForm.validate((valid) => {
					if (valid) {
						alert('请看控制台输出');
						console.log(this.form);
					}else{
						return false;
					}
				})
			},
			resetForm(){
				this.$refs.ruleForm.resetFields();
			}
		}
	}
</script>

<style scoped>
	.el-card+.el-card {margin-top: 15px;}
	.imglist .el-col+.el-col {margin-left: 8px;}

	.custom-empty {width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;background: #8c939d;border-radius:5px;}
	.custom-empty i {font-size: 30px;color: #fff;}
	.custom-empty p {font-size: 12px;font-weight: normal;color: #fff;margin-top: 10px;}
</style>
